home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / ExitGroc.Dxr / 00041.ls < prev    next >
Encoding:
Text File  |  1997-11-21  |  685 b   |  29 lines

  1. on mouseDown
  2.   global mySprite
  3.   set the visible of sprite 20 to 0
  4.   set wagonH to 577
  5.   set wagonV to 52
  6.   set mySprite to the clickOn
  7.   set startH to the locH of sprite mySprite
  8.   set startV to the locV of sprite mySprite
  9.   set snapped to dragItem(wagonH, wagonV, 0, 1)
  10.   if not snapped then
  11.     if sprite mySprite intersects 5 then
  12.       set NewsnapH to 1
  13.     else
  14.       set NewsnapH to 0
  15.     end if
  16.     if NewsnapH = 0 then
  17.       set the locH of sprite mySprite to startH
  18.       set the locV of sprite mySprite to startV
  19.       updateStage()
  20.     else
  21.       snapTo(mySprite, wagonH, wagonV)
  22.       set snapped to 1
  23.     end if
  24.   end if
  25.   if snapped then
  26.     go("back out")
  27.   end if
  28. end
  29.